package com.zjj.spring.read.xml.aop;

/**
 * 为避免混淆，复制一份常规实现类GreetingImpl
 * 作为引入增强类的实现及测试
 * 对类增强
 * 此种代理，可让被代理类无需实现某接口，即可通过代理调用某接口的方法
 * 具体的代理类为：{@link com.zjj.spring.read.xml.aop.springaop.intro.GreetingIntroAdvice}}
 * @author zhuangjiajie778
 */
public class GreetingIntroImpl implements Greeting{

	@Override
	public String hello(String name) {
		System.out.println(" --- GreetingIntroImpl hello : " + name + " ---");
		return "return GreetingIntroImpl#hello";
	}

	@Override
	public String except(String info) {
		System.out.println(" --- GreetingIntroImpl except : " + info + " ---");
		throw new RuntimeException("GreetingIntroImpl#error!!!");
	}
	
	@Override
	public String goodMorning(String name) {
		System.out.println(" --- GreetingIntroImpl goodMorning : " + name + " ---");
		return "return GreetingIntroImpl#goodMorning";
	}
	@Override
	public String goodNight(String name) {
		System.out.println(" --- GreetingIntroImpl goodNight : " + name + " ---");
		return "return GreetingIntroImpl#goodNight";
	}

}
